README File for "Black Lives, White Kids: White Parenting Practices Following Black-Led Protests"
by Allison P. Anoll, Andrew M. Engelhardt, and Mackenzie Israel-Trummel
February 28, 2022
Perspectives on Politics

#############
#
# Overview
# 
#############

This README file provides an inventory of all code used in the analysis. It also contains information on the relevant data sets used.

#############

#############
#
# Software
#
#############
Analyses were conducted in the following computing environment.

OSX 10.15.7
R version 4.0.2


Add-on R Libraries for analyses:
- stargazer_5.2.1
- ggplot2_3.3.0
- patchwork 1.1.1
- gridExtra 2.3
- lubridate 1.8.0


#############
#
# Notes on Code
#
#############
Files beginning with "1*" denote scripts for reproducing the tables and other results reported in the main text. Files beginning with "2*" produce the tables and other results reported for supplementary analyses in the appendix. The analysis files for the main text also store results reported in tables contained in the online appendix which offer more detail.

Within scripts, code is organized sequentially based on reporting of the relevant analyses in the paper, with descriptive headings calling out each analysis and specific steps.

Tables and figures are saved into the active working directory.

Specific files are as follows:

Analysis files (Main Text)
- 10_googleTrends.R
Script file to generate the trends in search term frequency used for Figure 1. Uses "google_trends.rdata" and "blm events.csv".
- 11_crowdtangle.R
Script file to generate trends in attention to race on Facebook parenting pages for Figure 2. CrowdTangle's terms and conditions prohibit sharing the data, but, once downloaded through CrowdTangle, the script will generate the reported figures
- 12_lucid.R
Script file to conduct analyses of Lucid data. This includes the descriptive statistics on parenting decisions reported in Tables 1 and 2 and analyses exploring correlates of parenting decisions presented in Figure 3. It also includes commands to export tables reporting additional model information included in the appendix. Uses "lc_dat.rdata".


Analysis files (Supplemental/Appendix)
- 20_D_lucid_models.R
Script file containing commands for supplementary analyses to main text analyses of Lucid data reported in appendix section D (Tables D4-D9). These analyses look at whether the sequence of predictor variables included in the model alters insights on apparent direct effects. Uses "lc_dat.rdata".
- 20_E_lucid_models.R
Script file containing commands for supplementary analyses to main text analyses of Lucid data reported in appendix sections E. These analyses look at whether gender moderates the link between family structure and parenting decisions. Uses "lc_dat.rdata".


#############
#
# Notes on Data
#
#############
The analyses use the following data sets:
1. "lc_dat" The cleaned analysis data set of the RPS data set described in the main text and in further detail in the appendix. Used in "12_lucid.R", "20_D_lucid_models.R", and "20_E_lucid_models.R"
2. "google_trends" A data frame including data downloaded from the GoogleTrends repository. Used in "10_googleTrends.R".
3. "blm events" A data set with labels and information on BLM relevant events used in GoogleTrends figure. Used in "10_googleTrends.R".

Replication file contains analysis data sets.

Note: CrowdTangle's terms and conditions prohibit us from sharing these data. These data can be accessed by registering for an account through CrowdTangle and following the sample selection and keyword search instructions described in the main text and appendix.